package cn.istartfinancial.controller.system;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: Nzp
 * @date: 2018/8/23
 * @description: 错误页面跳转处理
 */
@Controller
@RequestMapping(value = "/error")
public class ErrorController
{

    @GetMapping(value = "404")
    public String pageNotFound()
    {
        return "error/404";
    }

    @GetMapping(value = "403")
    public String NotFound(String message, Model model)
    {
        if (!StringUtils.isEmpty(message))
        {
            model.addAttribute("message", message);
        }
        return "error/403";
    }

}
